package com.alibaba.dubbo.demo.consumer.controller;


import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import javax.enterprise.inject.Model;
import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.alibaba.dubbo.demo.ActivemqService;
import com.alibaba.dubbo.demo.GoodsService;
import com.alibaba.dubbo.demo.SelectService;

@Controller
public class TestController {
	@Autowired private GoodsService goodsService;
	@Autowired private ActivemqService activemqService;
	
	@RequestMapping("/hj")
	public String sss(HttpServletRequest request){
		
		request.setAttribute("test", goodsService.selectByPrimaryKey(1).getBeizhu());
		return "test";
		
	}
	
	@RequestMapping("/activemq")
	public String send(HttpServletRequest request){
		activemqService.send();
		return "test";
		
	}
}
